package com.lbw.singleton;

/**
 * @author lbw
 * @version 1.0
 * @date 2021/9/4 22:47
 * 饿汉模式, 采用静态代码块
 */
public class Singleton2 {
    private final static Singleton2 INSTANCE;

    private Singleton2() {
    }

    static {
        INSTANCE = new Singleton2();
    }

    public static Singleton2 getInstance() {
        return INSTANCE;
    }
}
